<?php

// print_r($parametri);

?>

<form action="<?php echo $this->webroot;?>Parametro/save" method="post" id="form">

	<fieldset>
	    <legend>
			<h4>Parametri</h4>
	    </legend>
	    <label><?php echo __("Database") ?></label>
		<select name='database' >
			<?php foreach ($databases as $dbname => $db) { ?>
		  		<option value='<? echo $dbname?>' <? if($dbname == $this->Session->read("Config.wprofile.database")) echo " selected='selected' " ?> ?><? echo $dbname." - ".$db["database"] ?></option>
			<?php }?>
		</select> 
	    <label><?php echo __("Gruppo Registrazione") ?></label>
		<select name='Parametro[gruppo_registrazione]' >
			<option value=''></option>
			<?foreach ($groups as $key => $group) {?>
		  			<option value='<? echo $key?>' <? if($key == $parametri['Parametro']['gruppo_registrazione']) echo " selected='selected' " ?> ?><? echo $group ?></option>
			<? } ?> 
		</select> 
	    <label><?php echo __("Gruppo Administrators") ?></label>
		<select name='Parametro[gruppo_administrators]' >
			<option value=''></option>
			<?foreach ($groups as $key => $group) {?>
		  			<option value='<? echo $key?>' <? if($key == $parametri['Parametro']['gruppo_administrators']) echo " selected='selected' " ?> ?><? echo $group ?></option>
			<? } ?> 
		</select> 
		<p>
			<button type="submit" class="btn btn-primary"><i class='icon-ok'></i></button>
		</p>
	</fieldset>

</form>
